New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
JBTM-3005 Update to add a quickstart with the commmon-dbcp2 and tomcat #221
Conversation
Started testing this pull request: http://narayanaci1.eng.hst.ams2.redhat.com/job/btny-pulls-narayana-quickstart/42/ |
@zhfeng is this ready for review? |
It needs to add a recovery test. |
Started testing this pull request: http://narayanaci1.eng.hst.ams2.redhat.com/job/btny-pulls-narayana-quickstart/43/ |
for i in {1..10} | ||
do | ||
curl -f --data "test$i" http://localhost:8080/${QUICKSTART_NAME} | ||
done |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Would it be possible to add in something that calls the crash endpoint and then the recover one and verifies the json has the new string dao please?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yeah, I will do.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks!
* @throws SQLException | ||
*/ | ||
public void save(String string) throws SQLException { | ||
// Connection must be closed by transaction |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is that a restriction of DBCP2?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No, I don't think so. These codes are copied from the transactional driver quickstart, So it could remove these comments and invoke the close() method.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great. Please can you try that?
@zhfeng : I'm interested in one thing - should not be the class TransactionalDataSourceFactory (https://github.com/zhfeng/quickstart/blob/b203e83db6aab9605322b40ce6cd0997fd7cda6b/dbcp2-and-tomcat/src/main/java/io/narayana/TransactionalDataSourceFactory.java, or some similar) being part of the Narayana release (maybe tomcat-jta?). I mean it seems to me that whoever will want to integrate tomcat-dbcp2-narayana will need to copy&paste this class to his project, isn't that so? |
@ochaloup yeah, we should have this factory class in the tomcat-jta integration codebase. |
I agree with you, please can you raise the JIRA to do that? |
Started testing this pull request: http://narayanaci1.eng.hst.ams2.redhat.com/job/btny-pulls-narayana-quickstart/44/ |
https://issues.jboss.org/browse/JBTM-3005